//
//  ZiHaoTableViewCell.m
//  BeautyPicture
//
//  Created by LiuNa on 16/3/11.
//  Copyright © 2016年 szb. All rights reserved.
//

#import "ZiHaoTableViewCell.h"

@implementation ZiHaoTableViewCell

+ (instancetype)cellZiHaoWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"ZiHao";
    ZiHaoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[ZiHaoTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];        
    }
    return cell;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.textLabel.textColor = [UIColor blackColor];
        self.textLabel.font = [UIFont systemFontOfSize:14.0f];
        self.backgroundColor = [UIColor clearColor];
        
        
        self.duiHaoS = [[UIImageView alloc] init];
        self.duiHaoS.hidden = YES;
        self.duiHaoS.image = [UIImage imageNamed:@"Xuanzhong"];
        [self.contentView addSubview:self.duiHaoS];
        
        CGFloat imageY = 10.0f;
        CGFloat imageW = self.height - 20;
        CGFloat imageX = 23.0f;
        
        _colorView = [[UIView alloc] initWithFrame:CGRectMake(imageX, imageY, imageW, imageW)];
        [_colorView.layer setCornerRadius:imageW / 2.0];
        [self addSubview:_colorView];
        
        
    }
    return self;
}

- (void)setCellZiHaoSubviewsNil
{
    
    self.indentationLevel = 0;
    self.colorView.backgroundColor = nil;
    
    self.textLabel.text = nil;
    self.textLabel.textColor = nil;
    self.textLabel.font = nil;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.duiHaoS.frame = CGRectMake(3, 18, 10, 10);
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
